#include "Vector4.h"

SGF::Vector4::Vector4()
{
	_x = 0;
	_y = 0;
	_z = 0;
	_w = 1;
}

SGF::Vector4::Vector4( Real64 x, Real64 y, Real64 z, Real64 w /*= 1*/ )
{
	_x = x;
	_y = y;
	_z = z;
	_w = w;
}

SGF::Vector4::Vector4( const Vector4& src )
{
	_x = src._x;
	_y = src._y;
	_z = src._z;
}

SGF::Vector4& SGF::Vector4::operator=( const Vector4& src )
{
	_x = src._x;
	_y = src._y;
	_z = src._z;
	_w = src._w;
}

SGF::Real64& SGF::Vector4::operator[]( int index )
{
	switch(index)
	{
	case 0:
		return _x;
	case 1:
		return _y;
	case 2:
		return _z;
	case 3:
		return _w;
	default:
		throw 10;
	}
}